package com.cos.fegin.api;

import com.cos.fegin.impl.UserServiceImpl;
import com.cos.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "user",path = "/user",fallback = UserServiceImpl.class)
public interface UserService {

    @RequestMapping("/add")
    public boolean add(@RequestBody User user);

    @RequestMapping("/getList")
    public List<User> getList();
    @RequestMapping("/delete")
    public boolean delete(Integer id);
    @RequestMapping("/datadel")
    public boolean datadel(String id);
    @RequestMapping("/getUserList")
    public List<User> getUserList(@RequestBody User user);
    @RequestMapping("/toUpdate")
    public User toUpdate(Integer id);
    @RequestMapping("/update")
    public boolean update(@RequestBody User user);
}
